package com.henu.engineer.dao.mapper.cultivatingproject

import com.henu.engineer.dao.entity.cultivatingproject.RequirementIndicator
import org.apache.ibatis.annotations.Mapper
import org.springframework.stereotype.Repository

/**
 *
 * @author noexcept
 * @since 2021/8/10 15:00
 */
@Mapper
@Repository
interface RequirementIndicatorXmlMapper {

    fun insertIndicator(requirementId: Int, indicatorId: Int, content: String): Boolean

    fun insertIndicators(indicators: List<RequirementIndicator>): Int

    fun deleteIndicatorById(indicatorId: Int): Boolean

    /**
     * @param indicatorIds 包含指标点id的List
     */
    fun deleteIndicatorsById(indicatorIds: List<String>): Int

    /**
     * 删除某个毕业要求的所有指标点
     */
    fun deleteIndicatorsByRequirementId(requirementId: Int): Int

    fun updateIndicatorContent(indicatorId: Int, content: String): Boolean

    /**
     * 查询某个毕业要求的所有指标点及其内容
     */
    fun selectIndicatorByRequirementId(requirementId: Int): List<RequirementIndicator>

    fun selectIndicatorByRequirementIds(requirementIds: List<String>): List<RequirementIndicator>

    fun selectByIndicatorId(indicatorId: Int): RequirementIndicator?
}